package homework;

import org.junit.Test;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

public class LocalDateTest {
   @Test
    public void init(){
        LocalDate now = LocalDate.now();
        System.out.println(now);
        LocalDate of=LocalDate.of(2025,9,9);
        System.out.println(of);
    }
    @Test
    public void parse(){
       LocalDate  now = LocalDate.now();
       String v1=now.format(DateTimeFormatter.ofPattern("yyyy'年'MM'月'dd'日'"));
        System.out.println(v1);
        String v2="2026/09/01";
        LocalDate date2=LocalDate.parse(v2,DateTimeFormatter.ofPattern("yyyy/MM/dd"));
        System.out.println(date2);
    }
    @Test
    public void count(){
       LocalDate now = LocalDate.now();
       LocalDate v1=now.minusDays(1);
       System.out.println(v1);
    }

}
